import request from '@/utils/request'

export function getPage(params) {
  return request({
    url: '/pages',
    params
  })
}
// 删除接口
export function delRole(id) {
  return request({
    url: `/pages/${id}`,
    method: 'delete'
  })
}
// 新增接口
export function addyemian(data) {
  return request({
    url: `/pages/`,
    method: 'post',
    data
  })
}
// 回显数据编辑
export function getPermDetail(id) {
  return request({
    url: `/pages/${id}`
  })
}
// 编辑保存数据
export function editPerm(data) {
  return request({
    url: `/pages/${data.id}`,
    method: 'put',
    data
  })
}

export function getClientsCount() {
  return request({
    url: '/pages/count'
  })
}
